# -*- encoding: utf-8 -*-
'''
Filename         :1_twoSum.py
Description      :
Time             :2022/08/02 09:43:56
Author           :daiyizheng
Email            :387942239@qq.com
Version          :1.0
'''

from ast import List


class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        map = {}
        for i, num in enumerate(nums):
            if (target-num) in map:
                return [map[target-num], i]
            map[num] = i
        return [] 